#!/bin/sh
launchActivtiy=$1
command=$2
localRootDir=$3
command=${command/assemble/" "}
regex=$(echo $command | sed 's/'[A-Z]'/*/g')*.apk
echo ${regex}:
cat .sync/sync_apk.log | while read fname; do
	#statements
	echo ${fname}:
	adb install -r -t -d $localRootDir/$fname
  	if [ "$launchActivtiy" ]; then
   		adb shell am start -n $launchActivtiy
   	fi
  	break;
done
exit 0
